import request from '@/utils/request'

// 查询学生习惯信息列表
export function listHabits(query) {
  return request({
    url: '/students/habits/list',
    method: 'get',
    params: query
  })
}

// 查询学生习惯信息详细
export function getHabits(stuId) {
  return request({
    url: '/students/habits/' + stuId,
    method: 'get'
  })
}

// 新增学生习惯信息
export function addHabits(data) {
  return request({
    url: '/students/habits',
    method: 'post',
    data: data
  })
}

// 修改学生习惯信息
export function updateHabits(data) {
  return request({
    url: '/students/habits',
    method: 'put',
    data: data
  })
}

// 删除学生习惯信息
export function delHabits(stuId) {
  return request({
    url: '/students/habits/' + stuId,
    method: 'delete'
  })
}
